Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis cleanup #195

Merged
merged 2 commits into from
Sep 8, 2020
Merged

redis cleanup #195

merged 2 commits into from
Sep 8, 2020

Conversation

naseemkullah
Copy link
Member

@naseemkullah naseemkullah commented Sep 2, 2020

Which problem is this PR solving?

  • n/a

Short description of the changes

  • Removing unneeded type RedisPluginStreamTypes
  • only import required type from redis where applicable
  • prefer import type where applicable

@naseemkullah naseemkullah requested a review from a team September 2, 2020 05:38
@codecov
Copy link

codecov bot commented Sep 2, 2020

Codecov Report

Merging #195 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
- Coverage   95.29%   95.22%   -0.08%     
==========================================
  Files          88       93       +5     
  Lines        4381     4750     +369     
  Branches      478      492      +14     
==========================================
+ Hits         4175     4523     +348     
- Misses        206      227      +21     
Impacted Files Coverage Δ
node/opentelemetry-plugin-redis/src/utils.ts 90.90% <0.00%> (ø)
node/opentelemetry-plugin-ioredis/.eslintrc.js 0.00% <0.00%> (ø)
node/opentelemetry-plugin-ioredis/src/ioredis.ts 100.00% <0.00%> (ø)
node/opentelemetry-plugin-ioredis/src/utils.ts 85.36% <0.00%> (ø)
node/opentelemetry-plugin-ioredis/src/version.ts 100.00% <0.00%> (ø)
.../opentelemetry-plugin-ioredis/test/ioredis.test.ts 95.30% <0.00%> (ø)

@naseemkullah naseemkullah changed the title reids cleanup redis cleanup Sep 2, 2020
Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to just add type for all imports

import type * as redisTypes from 'redis'

without really changing redisTypes into redis and be consistent everywhere so avoid things like

import type { Callback } from 'redis';

but rather have

import type * as redisTypes from 'redis'

// and then 
callback: redisTypes.Callback<unknown>;

It is much more intuitive to see something like redisTypes.Callback instead of Callback or later
redisTypes.RedisClient instead of RedisClient mixed with RedisPluginClientTypes and trying to figure out which type comes from where

@obecny obecny added the enhancement New feature or request label Sep 7, 2020
Naseem added 2 commits September 7, 2020 20:30
…d type where applicable

Signed-off-by: Naseem <naseem@transit.app>
@naseemkullah
Copy link
Member Author

I would prefer to just add type for all imports

import type * as redisTypes from 'redis'

without really changing redisTypes into redis and be consistent everywhere so avoid things like

import type { Callback } from 'redis';

but rather have

import type * as redisTypes from 'redis'

// and then 
callback: redisTypes.Callback<unknown>;

It is much more intuitive to see something like redisTypes.Callback instead of Callback or later
redisTypes.RedisClient instead of RedisClient mixed with RedisPluginClientTypes and trying to figure out which type comes from where

Alright I've adjusted as requested.

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thx

@obecny obecny merged commit fb86c6f into open-telemetry:master Sep 8, 2020
@naseemkullah naseemkullah deleted the redis-cleanup branch September 8, 2020 01:36
@obecny obecny added internal and removed enhancement New feature or request labels Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants